
# This code is hosted on http://code.google.com/p/lenthorp/
# Freely available for use in applications, but should NOT be modified
# Email all comments to lenthorpresearch@gmail.com


import DataRetrieval.YahooFinance.saveYahooFinanceClose as yahoo
import DataRetrieval.FinancialTimes.saveFinancialTimesClose as ft
import DataRetrieval.PiTrading.savePiTradingClose as pt

saveCloseFunctionsDict = {'yahoofinance':yahoo,
                          'financialtimes':ft,
                          'pitrading':pt}

def getAndSaveData(source, ticker, dateStart, dateEnd):
    saveCloseFunctionsDict[source.lower()].getAndSaveData(ticker, dateStart, dateEnd)
    
